package com.ruoyi.inventory.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.inventory.mapper.TWarehouseTransactionItemMapper;
import com.ruoyi.inventory.domain.TWarehouseTransactionItem;
import com.ruoyi.inventory.service.ITWarehouseTransactionItemService;

/**
 * 出入库明细Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-09-24
 */
@Service
public class TWarehouseTransactionItemServiceImpl implements ITWarehouseTransactionItemService 
{
    @Autowired
    private TWarehouseTransactionItemMapper tWarehouseTransactionItemMapper;

    /**
     * 查询出入库明细
     * 
     * @param id 出入库明细主键
     * @return 出入库明细
     */
    @Override
    public TWarehouseTransactionItem selectTWarehouseTransactionItemById(Long id)
    {
        return tWarehouseTransactionItemMapper.selectTWarehouseTransactionItemById(id);
    }

    /**
     * 查询出入库明细列表
     * 
     * @param tWarehouseTransactionItem 出入库明细
     * @return 出入库明细
     */
    @Override
    public List<TWarehouseTransactionItem> selectTWarehouseTransactionItemList(TWarehouseTransactionItem tWarehouseTransactionItem)
    {
        return tWarehouseTransactionItemMapper.selectTWarehouseTransactionItemList(tWarehouseTransactionItem);
    }

    /**
     * 新增出入库明细
     * 
     * @param tWarehouseTransactionItem 出入库明细
     * @return 结果
     */
    @Override
    public int insertTWarehouseTransactionItem(TWarehouseTransactionItem tWarehouseTransactionItem)
    {
        return tWarehouseTransactionItemMapper.insertTWarehouseTransactionItem(tWarehouseTransactionItem);
    }

    /**
     * 修改出入库明细
     * 
     * @param tWarehouseTransactionItem 出入库明细
     * @return 结果
     */
    @Override
    public int updateTWarehouseTransactionItem(TWarehouseTransactionItem tWarehouseTransactionItem)
    {
        return tWarehouseTransactionItemMapper.updateTWarehouseTransactionItem(tWarehouseTransactionItem);
    }

    /**
     * 批量删除出入库明细
     * 
     * @param ids 需要删除的出入库明细主键
     * @return 结果
     */
    @Override
    public int deleteTWarehouseTransactionItemByIds(Long[] ids)
    {
        return tWarehouseTransactionItemMapper.deleteTWarehouseTransactionItemByIds(ids);
    }

    /**
     * 删除出入库明细信息
     * 
     * @param id 出入库明细主键
     * @return 结果
     */
    @Override
    public int deleteTWarehouseTransactionItemById(Long id)
    {
        return tWarehouseTransactionItemMapper.deleteTWarehouseTransactionItemById(id);
    }
}